<!-- 我的简历 -->
<template>
    <AllOut>
        <div class="index2_content" v-loading="loading">
            <TopNav :show_links="true"></TopNav>
            <div class="content_out index_content" style="padding-top:84px;">
                <b-container fluid>
                    <b-row>
                        <b-col md="3" sm="12">
                            <div class="" id="my_gd">
                                <Affix :offset="88">
                                    <Asdise :nav_value="1" @asdiseClick="asdiseClick" :companyData="{}" />
                                </Affix>
                            </div>
                        </b-col>
                        <b-col md="9" sm="12" class="">
                            <div class="indexNav_content flex  aic jcsb">
                                <div class="flex aic">
                                    <img @click="back()" src="/img/back.png" alt="" />
                                    <!-- <span class="fontz fonts18 gray">温馨提示：上传简历，一键解析，自动填写</span> -->
                                </div>
                                <div class="flex">
                                    <UploadFile @uploadImageClick="uploadImageClicks_g" style="margin-right: 16px;" />
                                    <!-- <el-button type="primary" v-if="editBool">上传简历</el-button> -->
                                    <!-- <el-button type="primary">导出简历</el-button> -->
                                    <el-button type="primary">预览</el-button>
                                    <el-button type="primary" @click="down()">下载</el-button>
                                    <!-- <el-button type="primary" v-if="!editBool" @click="edit()"
                                        style="margin-right: 22px;">编辑简历</el-button> -->
                                    <el-button type="primary" @click="submitForm('form')">提交</el-button>
                                    <el-button type="primary" @click="editClean()"
                                        style="margin-right: 22px;">取消</el-button>
                                </div>
                            </div>
                            <div class="indexNav_content flex  aic jcc" style="margin-top: 20px;">
                                <span class="fontz fonts24">成都香城人力资源开发有限公司应聘报名表</span>
                            </div>
                            <div class="my_main">
                                <el-form ref="form" :model="ruleForm" :rules="rules" label-width="80px"
                                    label-position="top">
                                    <!-- 个人信息 -->
                                    <div id="vital0">
                                        <p class="my_main_title fonts18 fontz fontw700">个人信息</p>
                                        <div class="my_grid ">
                                            <el-form-item label="姓名" prop="personalInformation.fullName">
                                                <el-input v-model="ruleForm.personalInformation.fullName"
                                                    placeholder="请输入姓名"></el-input>
                                            </el-form-item>
                                            <el-form-item label="照片" prop="">
                                                <UploadImage :data="upLoadImages" @uploadImageClick="uploadImageClicks_" />
                                            </el-form-item>
                                            <el-form-item label="性别" prop="personalInformation.gender">
                                                <el-select clearable v-model="ruleForm.personalInformation.gender"
                                                    placeholder="请选择性别" style="350px">
                                                    <el-option v-for="item in genderOption" :label="item.dictLabel"
                                                        :value="item.dictValue">
                                                    </el-option>
                                                </el-select>
                                            </el-form-item>
                                            <el-form-item label="身份证号" prop="personalInformation.idNumber">
                                                <el-input v-model="ruleForm.personalInformation.idNumber"
                                                    placeholder="请输入身份号"></el-input>
                                            </el-form-item>
                                            <el-form-item label="出生年月" prop="personalInformation.brithDay">
                                                <el-date-picker type="date" format="yyyy-MM-dd"
                                                    value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择出生年月"
                                                    v-model="ruleForm.personalInformation.brithDay" style="width: 350px;">
                                                </el-date-picker>
                                            </el-form-item>
                                            <el-form-item label="年龄" prop="personalInformation.age">
                                                <el-input v-model="ruleForm.personalInformation.age"
                                                    placeholder="请输入年龄"></el-input>
                                            </el-form-item>
                                            <el-form-item label="联系电话" prop="personalInformation.phoneNumber">
                                                <el-input v-model="ruleForm.personalInformation.phoneNumber"
                                                    placeholder="请输入联系电话"></el-input>
                                            </el-form-item>
                                            <el-form-item label="电子邮箱" prop="personalInformation.email">
                                                <el-input v-model="ruleForm.personalInformation.email"
                                                    placeholder="请输入电子邮箱"></el-input>
                                            </el-form-item>
                                            <el-form-item label="参加工作时间" prop="">
                                                <el-date-picker type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
                                                    placeholder="请选择参加工作时间"
                                                    v-model="ruleForm.personalInformation.startWorkTime"
                                                    style="width: 350px;">
                                                </el-date-picker>
                                            </el-form-item>
                                            <el-form-item label="紧急联系人及电话" prop="">
                                                <el-input v-model="ruleForm.personalInformation.emergencyPhoneNumber"
                                                    placeholder="请输入紧急联系人及电话"></el-input>
                                            </el-form-item>
                                            <el-form-item label="籍贯" prop="">
                                                <el-input v-model="ruleForm.personalInformation.nativePlace"
                                                    placeholder="请输入籍贯"></el-input>
                                            </el-form-item>
                                            <el-form-item label="政治面貌" prop="">
                                                <el-select v-model="ruleForm.personalInformation.politicalOutlook"
                                                    placeholder="请选择政治面貌" style="width: 350px;">
                                                    <el-option v-for="item in politicalOutlookOption"
                                                        :label="item.dictLabel" :value="item.dictValue">
                                                    </el-option>
                                                </el-select>
                                            </el-form-item>
                                            <el-form-item label="婚姻" prop="">
                                                <el-select v-model="ruleForm.personalInformation.marriage"
                                                    placeholder="请选择婚姻" style="width: 350px;">
                                                    <el-option v-for="item in marriageOption" :label="item.dictLabel"
                                                        :value="item.dictValue">
                                                    </el-option>
                                                </el-select>
                                            </el-form-item>
                                            <el-form-item label="健康状态" prop="">
                                                <el-input v-model="ruleForm.personalInformation.health"
                                                    placeholder="请输入健康状态"></el-input>
                                            </el-form-item>
                                            <el-form-item label="现住地址" prop="">
                                                <el-input v-model="ruleForm.personalInformation.currentAddress"
                                                    placeholder="请输入现住地址"></el-input>
                                            </el-form-item>
                                            <el-form-item label="户籍地址（身份证地址）" prop="">
                                                <el-input v-model="ruleForm.personalInformation.registeredAddress"
                                                    placeholder="请输入户籍地址（身份证地址）"></el-input>
                                            </el-form-item>
                                            <el-form-item label="熟悉专业 有何专长（示例）" prop="">
                                                <el-input v-model="ruleForm.personalInformation.majorAndSpecialty"
                                                    placeholder="请输入专业"></el-input>
                                            </el-form-item>
                                            <el-form-item label="目前年薪" prop="">
                                                <el-input v-model="ruleForm.personalInformation.currentAnnualSalary"
                                                    placeholder="税前">
                                                    <span slot="suffix" class="fonts12">万/年</span>
                                                </el-input>
                                            </el-form-item>
                                            <el-form-item label="重点人群" prop="">
                                                <el-select v-model="ruleForm.personalInformation.keyPopulationInformation"
                                                    placeholder="请选择" style="width: 350px;">
                                                    <el-option v-for="item in keyPopulationInformationOption"
                                                        :label="item.dictLabel" :value="item.dictValue"></el-option>
                                                </el-select>
                                            </el-form-item>
                                            <el-form-item label="现工作单位" prop="">
                                                <el-input v-model="ruleForm.personalInformation.currentWorkUnit"
                                                    placeholder="请输入现工作单位"></el-input>
                                            </el-form-item>
                                            <el-form-item label="现任职务" prop="">
                                                <el-input v-model="ruleForm.personalInformation.currentPosition"
                                                    placeholder="请输入现任职务"></el-input>
                                            </el-form-item>
                                            <el-form-item label="是否服从调剂" prop="">
                                                <el-select v-model="ruleForm.personalInformation.obeyAdjustment"
                                                    placeholder="请选择是否服从调剂" style="width: 350px;">
                                                    <el-option v-for="item in sys_yes_noOption" :label="item.dictLabel"
                                                        :value="item.dictValue">
                                                    </el-option>
                                                </el-select>
                                            </el-form-item>
                                        </div>
                                    </div>
                                    <!-- 求职意向 -->
                                    <div id="vital1">
                                        <p class="my_main_title fonts18 fontz fontw700">求职意向</p>
                                        <div class=" my_grid">
                                            <el-form-item label="期望工作性质"
                                                prop="personalInformation.lookingForwardNatureWork">
                                                <el-select clearable
                                                    v-model="ruleForm.personalInformation.lookingForwardNatureWork"
                                                    placeholder="请选择期望工作性质" style="width: 350px;">
                                                    <el-option v-for="item in lookingForwardNatureWorkOption"
                                                        :label="item.dictLabel" :value="item.dictValue">
                                                    </el-option>
                                                </el-select>
                                            </el-form-item>
                                            <el-form-item label="期望从事行业" prop="personalInformation.lookingForwardIndustry">
                                                <el-select clearable
                                                    v-model="ruleForm.personalInformation.lookingForwardIndustry"
                                                    placeholder="请选择期望从事行业" style="width: 350px;">
                                                    <el-option v-for="item in lookingForwardIndustryOption"
                                                        :label="item.dictLabel" :value="item.dictValue">
                                                    </el-option>
                                                </el-select>
                                            </el-form-item>
                                            <el-form-item label="期望薪资" prop="personalInformation.lookingForwardSalary">
                                                <el-select clearable
                                                    v-model="ruleForm.personalInformation.lookingForwardSalary"
                                                    placeholder="请选择期望薪资" style="width: 350px;">
                                                    <el-option v-for="item in lookingForwardSalaryOption"
                                                        :label="item.dictLabel" :value="item.dictValue">
                                                    </el-option>
                                                </el-select>
                                            </el-form-item>
                                            <!-- <el-form-item label="期望工作城市" prop="">
                                                <el-input clearable v-model="ruleForm.personalInformation.idNumber"
                                                    placeholder="请输入期望工作城市"></el-input>
                                            </el-form-item> -->
                                            <el-form-item label="求职状态" prop="personalInformation.jobSearchStatus">
                                                <el-select clearable v-model="ruleForm.personalInformation.jobSearchStatus"
                                                    placeholder="请选择期望求职状态" style="width: 350px;">
                                                    <el-option v-for="item in jobSearchStatusOption" :label="item.dictLabel"
                                                        :value="item.dictValue">
                                                    </el-option>
                                                </el-select>
                                            </el-form-item>
                                            <el-form-item label="到岗时间" prop="personalInformation.arrivalTime">
                                                <el-select clearable v-model="ruleForm.personalInformation.arrivalTime"
                                                    placeholder="请选择期望求职状态" style="width: 350px;">
                                                    <el-option v-for="item in arrivalTimeOption" :label="item.dictLabel"
                                                        :value="item.dictValue">
                                                    </el-option>
                                                </el-select>
                                            </el-form-item>
                                        </div>
                                    </div>
                                    <!-- 工作经历 -->
                                    <div id="vital2">
                                        <p class="my_main_title fonts18 fontz fontw700 flex jcsb">工作经历
                                            <span>
                                                <!-- <el-button type="danger" icon="el-icon-delete">删除</el-button> -->
                                                <el-button type="primary" icon="el-icon-plus" @click="add(0)">新增</el-button>
                                            </span>
                                        </p>
                                        <div class="my_grid" v-for="(item, index) in ruleForm.workExperiences">
                                            <el-button class="my_grid_delete" type="danger" icon="el-icon-delete"
                                                @click="deleteClick(0, item, index)">删除</el-button>
                                            <el-form-item label="公司名称" :prop="`workExperiences[${index}].companyName`"
                                                :rules="rules.workExperiences.companyName">
                                                <el-input clearable v-model="item.companyName"
                                                    placeholder="请输入公司名称"></el-input>
                                            </el-form-item>
                                            <el-form-item label="在职时间"
                                                :prop="`workExperiences[${index}].experienceStartTime`">
                                                <div class="flex">
                                                    <el-form-item label=""
                                                        :prop="`workExperiences[${index}].experienceStartTime`"
                                                        :rules="rules.workExperiences.experienceStartTime">
                                                        <el-date-picker clearable type="date" placeholder="开始时间"
                                                            format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"
                                                            v-model="item.experienceStartTime" style="width: 180px;">
                                                        </el-date-picker>
                                                    </el-form-item>
                                                    <span style="margin: 0px 10px 0px 10px;">-</span>
                                                    <el-form-item label=""
                                                        :prop="`workExperiences[${index}].experienceEndTime`"
                                                        :rules="rules.workExperiences.experienceEndTime">
                                                        <el-date-picker clearable type="date" placeholder="结束时间"
                                                            format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"
                                                            v-model="item.experienceEndTime" style="width: 180px;">
                                                        </el-date-picker>
                                                    </el-form-item>
                                                </div>
                                            </el-form-item>
                                            <el-form-item label="担任职位" :prop="`workExperiences[${index}].positionName`"
                                                :rules="rules.workExperiences.positionName">
                                                <el-input clearable v-model="item.positionName"
                                                    placeholder="请输入担任职位"></el-input>
                                            </el-form-item>
                                            <el-form-item label="所在部门" :prop="`workExperiences[${index}].departmentName`"
                                                :rules="rules.workExperiences.departmentName">
                                                <el-input clearable v-model="item.departmentName"
                                                    placeholder="请输入所在部门"></el-input>
                                            </el-form-item>
                                            <el-form-item label="工作内容" :prop="`workExperiences[${index}].workDescription`"
                                                :rules="rules.workExperiences.workDescription">
                                                <el-input clearable type="textarea" v-model="item.workDescription" rows="4"
                                                    placeholder="请输入工作内容" style="width: 350px;">
                                                </el-input>
                                            </el-form-item>
                                        </div>
                                    </div>
                                    <!-- 教育经历 -->
                                    <div id="vital3">
                                        <p class="my_main_title fonts18 fontz fontw700 flex jcsb">
                                            教育经历
                                            <span>
                                                <el-button type="primary" icon="el-icon-plus" @click="add(1)">新增</el-button>
                                            </span>
                                        </p>
                                        <div class="" v-for="(item, index) in ruleForm.educationExperiences">
                                            <div class="my_grid">
                                                <el-button class="my_grid_delete" type="danger" icon="el-icon-delete"
                                                    @click="deleteClick(1, item, index)">删除</el-button>
                                                <el-form-item label="学校名称"
                                                    :prop="`educationExperiences[${index}].schoolName`"
                                                    :rules="rules.educationExperiences.schoolName">
                                                    <el-input clearable v-model="item.schoolName"
                                                        placeholder="请输入学校名称"></el-input>
                                                </el-form-item>
                                                <el-form-item label="在校时间"
                                                    :prop="`educationExperiences[${index}].experienceStartTime`"
                                                    :rules="rules.educationExperiences.experienceStartTime">
                                                    <div class="flex">
                                                        <el-form-item label=""
                                                            :prop="`educationExperiences[${index}].experienceStartTime`"
                                                            :rules="rules.educationExperiences.experienceStartTime">
                                                            <el-date-picker clearable type="date" placeholder="开始时间"
                                                                format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"
                                                                v-model="item.experienceStartTime" style="width: 180px;">
                                                            </el-date-picker>
                                                        </el-form-item>
                                                        <span style="margin: 0px 10px 0px 10px;">-</span>
                                                        <el-form-item label=""
                                                            :prop="`educationExperiences[${index}].experienceEndTime`"
                                                            :rules="rules.educationExperiences.experienceEndTime">
                                                            <el-date-picker clearable type="date" placeholder="结束时间"
                                                                format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"
                                                                v-model="item.experienceEndTime" style="width: 180px;">
                                                            </el-date-picker>
                                                        </el-form-item>
                                                    </div>
                                                </el-form-item>
                                                <el-form-item label="学历"
                                                    :prop="`educationExperiences[${index}].educationLevel`"
                                                    :rules="rules.educationExperiences.educationLevel">
                                                    <el-select clearable v-model="item.educationLevel" placeholder="请选择学历"
                                                        style="width: 350px;">
                                                        <el-option v-for="item in educationLevelOption"
                                                            :label="item.dictLabel" :value="item.dictValue">
                                                        </el-option>
                                                    </el-select>
                                                </el-form-item>
                                                <el-form-item label="学信网编码"
                                                    :prop="`educationExperiences[${index}].xuexinCoding`"
                                                    :rules="rules.educationExperiences.xuexinCoding">
                                                    <el-input clearable v-model="item.xuexinCoding"
                                                        placeholder="请输入学信网编码"></el-input>
                                                </el-form-item>
                                                <el-form-item label="所学专业"
                                                    :prop="`educationExperiences[${index}].specialFieldName`"
                                                    :rules="rules.educationExperiences.specialFieldName">
                                                    <el-input clearable v-model="item.specialFieldName"
                                                        placeholder="请输入所学专业"></el-input>
                                                </el-form-item>
                                                <el-form-item label="担任职位"
                                                    :prop="`educationExperiences[${index}].positionName`"
                                                    :rules="rules.educationExperiences.positionName">
                                                    <el-input clearable v-model="item.positionName"
                                                        placeholder="请输入担任职位"></el-input>
                                                </el-form-item>
                                            </div>
                                            <el-form-item label="专业描述"
                                                :prop="`educationExperiences[${index}].specialFieldDescription`"
                                                :rules="rules.educationExperiences.specialFieldDescription">
                                                <el-input clearable type="textarea" v-model="item.specialFieldDescription"
                                                    rows="4" placeholder="请输入专业描述" style="width: 84.4%;">
                                                </el-input>
                                            </el-form-item>
                                            <el-form-item label="学历附件" prop="">
                                                <div @click="uploadImageClick_es(index)">
                                                    <UploadImageList :data="item.upLoadImages_e"
                                                        @uploadImageClick="uploadImageClick_e" />
                                                </div>
                                            </el-form-item>
                                        </div>

                                    </div>
                                    <!-- 项目经历 -->
                                    <div id="vital4">
                                        <p class="my_main_title fonts18 fontz fontw700 flex jcsb">项目经历
                                            <span>
                                                <el-button type="primary" icon="el-icon-plus" @click="add(2)">新增</el-button>
                                            </span>
                                        </p>
                                        <div class="my_grid" v-for="(item, index) in ruleForm.projectExperiences">
                                            <el-button class="my_grid_delete" type="danger" icon="el-icon-delete"
                                                @click="deleteClick(2, item, index)">删除</el-button>
                                            <el-form-item label="项目名称" :prop="`projectExperiences[${index}].projectName`"
                                                :rules="rules.projectExperiences.projectName">
                                                <el-input clearable v-model="item.projectName"
                                                    placeholder="请输入项目名称"></el-input>
                                            </el-form-item>
                                            <el-form-item label="项目起止时间" prop="">
                                                <div class="flex">
                                                    <el-form-item label=""
                                                        :prop="`projectExperiences[${index}].experienceStartTime`"
                                                        :rules="rules.projectExperiences.experienceStartTime">
                                                        <el-date-picker clearable type="date" placeholder="开始时间"
                                                            format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"
                                                            v-model="item.experienceStartTime" style="width: 180px;">
                                                        </el-date-picker>
                                                    </el-form-item>
                                                    <span style="margin: 0px 10px 0px 10px;">-</span>
                                                    <el-form-item label=""
                                                        :prop="`projectExperiences[${index}].experienceEndTime`"
                                                        :rules="rules.projectExperiences.experienceEndTime">
                                                        <el-date-picker clearable type="date" placeholder="结束时间"
                                                            format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"
                                                            v-model="item.experienceEndTime" style="width: 180px;">
                                                        </el-date-picker>
                                                    </el-form-item>
                                                </div>
                                            </el-form-item>
                                            <el-form-item label="担任职位" :prop="`projectExperiences[${index}].positionName`"
                                                :rules="rules.projectExperiences.positionName">
                                                <el-input clearable v-model="item.positionName"
                                                    placeholder="请输入担任职位"></el-input>
                                            </el-form-item>
                                            <el-form-item label="项目描述"
                                                :prop="`projectExperiences[${index}].projectDescription`"
                                                :rules="rules.projectExperiences.projectDescription">
                                                <el-input clearable type="textarea" v-model="item.projectDescription"
                                                    rows="4" placeholder="请输入项目描述" style="350px"></el-input>
                                            </el-form-item>

                                        </div>
                                    </div>
                                    <!-- 培训经历 -->
                                    <div id="vital5">
                                        <p class="my_main_title fonts18 fontz fontw700 flex jcsb">培训经历
                                            <span>
                                                <el-button type="primary" icon="el-icon-plus" @click="add(3)">新增</el-button>
                                            </span>
                                        </p>
                                        <div class="my_grid" v-for="(item, index) in ruleForm.trainingExperiences">
                                            <el-button class="my_grid_delete" type="danger" icon="el-icon-delete"
                                                @click="deleteClick(3, item, index)">删除</el-button>
                                            <el-form-item label="培训中心"
                                                :prop="`trainingExperiences[${index}].experienceName`"
                                                :rules="rules.trainingExperiences.experienceName">
                                                <el-input clearable v-model="item.experienceName"
                                                    placeholder="请输入培训中心"></el-input>
                                            </el-form-item>
                                            <el-form-item label="项目起止时间" prop="">
                                                <div class="flex">
                                                    <el-form-item label=""
                                                        :prop="`trainingExperiences[${index}].experienceStartTime`"
                                                        :rules="rules.trainingExperiences.experienceStartTime">
                                                        <el-date-picker clearable type="date" placeholder="开始时间"
                                                            format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"
                                                            v-model="item.experienceStartTime" style="width: 180px;">
                                                        </el-date-picker>
                                                    </el-form-item>
                                                    <span style="margin: 0px 10px 0px 10px;">-</span>
                                                    <el-form-item label=""
                                                        :prop="`trainingExperiences[${index}].experienceEndTime`"
                                                        :rules="rules.trainingExperiences.experienceEndTime">
                                                        <el-date-picker clearable type="date" placeholder="结束时间"
                                                            format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"
                                                            v-model="item.experienceEndTime" style="width: 180px;">
                                                        </el-date-picker>
                                                    </el-form-item>
                                                </div>
                                            </el-form-item>
                                            <el-form-item label="培训方向"
                                                :prop="`trainingExperiences[${index}].experienceDirections`"
                                                :rules="rules.trainingExperiences.experienceDirections">
                                                <el-input clearable v-model="item.experienceDirections"
                                                    placeholder="请输入培训方向"></el-input>
                                            </el-form-item>
                                            <el-form-item label="培训描述"
                                                :prop="`trainingExperiences[${index}].experienceDescription`"
                                                :rules="rules.trainingExperiences.experienceDescription">
                                                <el-input clearable type="textarea" v-model="item.experienceDescription"
                                                    rows="4" placeholder="请输入培训描述" style="width: 350px;"></el-input>
                                            </el-form-item>
                                        </div>
                                    </div>
                                    <!-- 专业技能 -->
                                    <div id="vital6">
                                        <p class="my_main_title fonts18 fontz fontw700 flex jcsb">专业技能
                                            <span>
                                                <el-button type="primary" icon="el-icon-plus" @click="add(4)">新增</el-button>
                                            </span>
                                        </p>
                                        <div class="my_grid" v-for="(item, index) in ruleForm.skills">
                                            <el-button class="my_grid_delete" type="danger" icon="el-icon-delete"
                                                @click="deleteClick(4, item, index)">删除</el-button>
                                            <el-form-item label="技能名称" :prop="`skills[${index}].skillName`"
                                                :rules="rules.skills.skillName">
                                                <el-input clearable v-model="item.skillName"
                                                    placeholder="请输入技能名称"></el-input>
                                            </el-form-item>
                                            <el-form-item label="掌握时间" :prop="`skills[${index}].masterTime`"
                                                :rules="rules.skills.masterTime">
                                                <el-date-picker clearable type="date" format="yyyy-MM-dd"
                                                    value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择掌握时间"
                                                    v-model="item.masterTime" style="width: 350px;">
                                                </el-date-picker>
                                            </el-form-item>
                                            <el-form-item label="熟练程度" :prop="`skills[${index}].proficiencyLevel`"
                                                :rules="rules.skills.proficiencyLevel">
                                                <el-select clearable v-model="item.proficiencyLevel" placeholder="请选择熟练程度"
                                                    style="width: 350px;">
                                                    <el-option v-for="item in proficiencyLevelOptions"
                                                        :label="item.dictLabel" :value="item.dictValue">
                                                    </el-option>
                                                </el-select>
                                            </el-form-item>
                                        </div>
                                    </div>
                                    <!-- 资格证书 -->
                                    <div id="vital7">
                                        <p class="my_main_title fonts18 fontz fontw700 flex jcsb">资格证书
                                            <span>
                                                <el-button type="primary" icon="el-icon-plus" @click="add(5)">新增</el-button>
                                            </span>
                                        </p>
                                        <div class="my_grid" v-for="(item, index) in ruleForm.certificates">
                                            <el-button class="my_grid_delete" type="danger" icon="el-icon-delete"
                                                @click="deleteClick(5, item, index)">删除</el-button>
                                            <el-form-item label="证书全称" :prop="`certificates[${index}].certificateName`"
                                                :rules="rules.certificates.certificateName">
                                                <el-input clearable v-model="item.certificateName"
                                                    placeholder="请输入证书全称"></el-input>
                                            </el-form-item>
                                            <el-form-item label="颁发时间" :prop="`certificates[${index}].issuanceTime`"
                                                :rules="rules.certificates.issuanceTime">
                                                <el-date-picker clearable type="date" format="yyyy-MM-dd"
                                                    value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择掌握时间"
                                                    v-model="item.issuanceTime" style="width:350px;">
                                                </el-date-picker>
                                            </el-form-item>
                                            <el-form-item label="颁发单位" :prop="`certificates[${index}].issuanceUnit`"
                                                :rules="rules.certificates.issuanceUnit">
                                                <el-input clearable v-model="item.issuanceUnit"
                                                    placeholder="请输入颁发单位"></el-input>
                                            </el-form-item>
                                            <el-form-item label="证书描述" :prop="`certificates[${index}].desc`"
                                                :rules="rules.certificates.desc">
                                                <el-input clearable type="textarea" v-model="item.desc" rows="4"
                                                    placeholder="请输入证书描述" style="width: 350px;"></el-input>
                                            </el-form-item>
                                            <el-form-item label="资格证书附件" prop="">
                                                <div @click="uploadImageClick_es(index)">
                                                    <UploadImageList :data="item.upLoadImages_e"
                                                        @uploadImageClick="uploadImageClick_z" />
                                                </div>

                                            </el-form-item>
                                        </div>
                                    </div>
                                    <!-- 自我评价 -->
                                    <div id="vital8">
                                        <p class="my_main_title fonts18 fontz fontw700 flex jcsb">自我评价
                                        </p>
                                        <div class="">
                                            <el-form-item label="" prop="personalInformation.selfEvaluation">
                                                <el-input type="textarea" :rows="4" placeholder="请输入自我评价"
                                                    v-model="ruleForm.personalInformation.selfEvaluation"
                                                    style="width: 85.5%;"></el-input>
                                            </el-form-item>
                                        </div>
                                    </div>
                                    <!-- 业绩及奖惩情况 -->
                                    <div id="vital11">
                                        <p class="my_main_title fonts18 fontz fontw700 flex jcsb">业绩及奖惩情况
                                        </p>
                                        <div class="">
                                            <el-form-item label="" prop="personalInformation.performanceRewardsPunishments">
                                                <el-input type="textarea" :rows="4" placeholder="请输入业绩及奖惩情况"
                                                    v-model="ruleForm.personalInformation.performanceRewardsPunishments"
                                                    style="width: 85.5%;"></el-input>
                                            </el-form-item>
                                        </div>
                                    </div>
                                    <!--家庭主要成员及重要社会关系  -->
                                    <div id="vital9">
                                        <p class="my_main_title fonts18 fontz fontw700 flex jcsb">
                                            家庭主要成员及重要社会关系
                                            <span class="fontz fonts14"
                                                style="margin-right:300px">填写说明：未婚/离异填父母、兄弟姐妹；已婚填配偶、子女</span>
                                            <span>
                                                <el-button type="primary" icon="el-icon-plus" @click="add(6)">新增</el-button>
                                            </span>
                                        </p>
                                        <el-table :data="ruleForm.familyMembers" style="width: 85.5%;" border
                                            @row-dblclick="dbclick" :cell-class-name="tableCellClassName">
                                            <el-table-column prop="title" label="称谓">
                                                <template slot-scope="scope">
                                                    <!--v-if去判断双击的是不是当前单元格-->
                                                    <el-input @blur="hideInput" size="mini" style="width: 80%;"
                                                        :ref="scope.row.index + ',' + scope.column.index"
                                                        v-model="scope.row.title"
                                                        v-if="scope.row.index + ',' + scope.column.index == currentCell">
                                                    </el-input>
                                                    <span v-else>{{ scope.row.title }}</span>
                                                </template>
                                            </el-table-column>
                                            <el-table-column prop="fullName" label="姓名">
                                                <template slot-scope="scope">
                                                    <!--v-if去判断双击的是不是当前单元格-->
                                                    <el-input @blur="hideInput" size="mini" style="width: 80%;"
                                                        :ref="scope.row.index + ',' + scope.column.index"
                                                        v-model="scope.row.fullName"
                                                        v-if="scope.row.index + ',' + scope.column.index == currentCell">
                                                    </el-input>
                                                    <span v-else>{{ scope.row.fullName }}</span>
                                                </template>
                                            </el-table-column>
                                            <el-table-column prop="brithDay" label="出生年月">
                                                <template slot-scope="scope">
                                                    <el-date-picker type="date" format="yyyy-MM-dd" @blur="hideInput"
                                                        size="mini" style="width: 80%;"
                                                        :ref="scope.row.index + ',' + scope.column.index"
                                                        v-model="scope.row.brithDay"
                                                        v-if="scope.row.index + ',' + scope.column.index == currentCell"
                                                        value-format="yyyy-MM-dd HH:mm:ss" placeholder="出生年月">
                                                    </el-date-picker>
                                                    <!--v-if去判断双击的是不是当前单元格-->
                                                    <!-- <el-input @blur="hideInput" size="mini" style="width: 80%;"
                                                        :ref="scope.row.index + ',' + scope.column.index"
                                                        v-model="scope.row.brithDay"
                                                        v-if="scope.row.index + ',' + scope.column.index == currentCell">
                                                    </el-input> -->
                                                    <span v-else>{{ scope.row.brithDay }}</span>
                                                </template>
                                            </el-table-column>
                                            <el-table-column prop="politicalOutlook" label="政治面貌">
                                                <template slot-scope="scope">
                                                    <!--v-if去判断双击的是不是当前单元格-->
                                                    <el-select @change="hideInput" size="mini" style="width:120px;"
                                                        :ref="scope.row.index + ',' + scope.column.index"
                                                        v-model="scope.row.politicalOutlook"
                                                        v-if="scope.row.index + ',' + scope.column.index == currentCell"
                                                        placeholder="政治面貌">
                                                        <el-option v-for="item in politicalOutlookOption"
                                                            :label="item.dictLabel" :value="item.dictValue">
                                                        </el-option>
                                                    </el-select>
                                                    <!-- <el-input @blur="hideInput" size="mini" style="width: 80%;"
                                                            :ref="scope.row.index + ',' + scope.column.index"
                                                            v-model="scope.row.politicalOutlook"
                                                            v-if="scope.row.index + ',' + scope.column.index == currentCell">
                                                        </el-input> -->
                                                    <span v-else>{{ dict(scope.row.politicalOutlook, "political_outlook")
                                                    }}</span>
                                                </template>
                                            </el-table-column>
                                            <el-table-column prop="workUnitAndPosition" label="工作单位及职务">
                                                <template slot-scope="scope">
                                                    <!--v-if去判断双击的是不是当前单元格-->
                                                    <el-input @blur="hideInput" size="mini" style="width: 80%;"
                                                        :ref="scope.row.index + ',' + scope.column.index"
                                                        v-model="scope.row.workUnitAndPosition"
                                                        v-if="scope.row.index + ',' + scope.column.index == currentCell">
                                                    </el-input>
                                                    <span v-else>{{ scope.row.workUnitAndPosition }}</span>
                                                </template>
                                            </el-table-column>
                                            <el-table-column prop="contactInformation" label="联系方式">
                                                <template slot-scope="scope">
                                                    <!--v-if去判断双击的是不是当前单元格-->
                                                    <el-input @blur="hideInput" size="mini" style="width: 80%;"
                                                        :ref="scope.row.index + ',' + scope.column.index"
                                                        v-model="scope.row.contactInformation"
                                                        v-if="scope.row.index + ',' + scope.column.index == currentCell">
                                                    </el-input>
                                                    <span v-else>{{ scope.row.contactInformation }}</span>
                                                </template>
                                            </el-table-column>
                                            <el-table-column prop="" label="操作">
                                                <template slot-scope="scope">
                                                    <!--v-if去判断双击的是不是当前单元格-->
                                                    <el-button class="my_grid_delete" type="danger" icon="el-icon-delete"
                                                        @click="deleteClick(6, scope.row, scope.row.index)">删除</el-button>
                                                </template>
                                            </el-table-column>
                                        </el-table>
                                    </div>
                                    <!-- 本人承诺 -->
                                    <div id="vital10">
                                        <p class="my_main_title fonts18 fontz fontw700">本人承诺</p>
                                        <p class="fontz fonts14 " style="width: 85.5%;">
                                            本人郑重承诺：本人向成都香城人力资源开发有限公司提供应聘简历、身份信息、教育经历、工作履历、证书证件等个人信息完全真实可靠，不存在弄虚作假情况。如证实本人提供的个人信息存在虚假情况，本人愿意承担相应的法律责任。
                                        </p>
                                    </div>


                                </el-form>

                            </div>
                        </b-col>
                    </b-row>
                </b-container>
            </div>
        </div>
    </AllOut>
</template>

<script>
import {
    editResume,
    getResume,
    exportResume
} from "@/api/my.js"
import { getInfo } from "@/api/login";
import { dictSect, dictFun, dictFuns } from "@/utils/dictUnit"
import axios from 'axios'
export default {
    data() {
        var checkEmail = (rule, value, callback) => {//邮箱校验
            const mailReg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/
            if (!value) {
                return callback(new Error('邮箱不能为空'))
            }
            setTimeout(() => {
                if (mailReg.test(value)) {
                    callback()
                } else {
                    callback(new Error('请输入正确的邮箱格式'))
                }
            }, 100)
        };
        var checkPhone = (rule, value, callback) => {
            if (!value) {
                return callback(new Error("手机号不能为空"));
            } else {
                const reg = /^1[3-9][0-9]\d{8}$/;
                // 这里定义的reg变量没有加引号，所以是一种特殊的数据类型，即正则，可以直接用test()方法
                if (reg.test(value)) {
                    callback();
                } else {
                    // 具体错误信息没有提示
                    return callback(new Error("请输入正确的手机号"));
                }
            }
        };
        return {
            datas: [],
            form: {

            },
            tableData: [{
                date: '2016-05-03',
                name: '王小虎',
                address: '上海市普陀区金沙江路 1518 弄'
            }],
            rules: {
                personalInformation: {
                    fullName: [{
                        required: true,
                        message: '请输入姓名',
                        trigger: 'blur'
                    },],
                    gender: [{
                        required: true,
                        message: '请选择性别',
                        trigger: 'change'
                    }],
                    brithDay: [{
                        required: true,
                        message: '请输入出生年月',
                        trigger: 'blur'
                    }],
                    age: [{
                        required: true,
                        message: '请输入年龄',
                        trigger: 'blur'
                    }],
                    phoneNumber: [{
                        required: true,
                        message: '请输入手机号',
                        trigger: 'blur'
                    }, {
                        validator: checkPhone,
                        trigger: "blur"
                    }],
                    email: [{
                        required: true,
                        message: '请输入电子邮箱',
                        trigger: 'blur'
                    }, {
                        validator: checkEmail,
                        trigger: "blur"
                    }],
                    idNumber: [{
                        pattern: /^\d{17}(\d|x)$/i,
                        message: '身份证号格式不正确',
                        trigger: 'blur'
                    }],
                    lookingForwardNatureWork: [{
                        required: true,
                        message: '请选择期望工作性质',
                        trigger: 'blur'
                    }
                    ],
                    lookingForwardIndustry: [{
                        required: true,
                        message: '请选择期望从事行业',
                        trigger: 'blur'
                    }
                    ],
                    lookingForwardSalary: [{
                        required: true,
                        message: '请选择期望薪资',
                        trigger: 'blur'
                    }
                    ],
                    jobSearchStatus: [{
                        required: true,
                        message: '请选择求职状态',
                        trigger: 'blur'
                    }
                    ],
                    arrivalTime: [{
                        required: true,
                        message: '请选择到岗时间',
                        trigger: 'blur'
                    }
                    ],
                    // 自我评价
                    selfEvaluation: [{
                        required: true,
                        message: '请输入自我评价',
                        trigger: 'blur'
                    }
                    ],
                    // 业绩
                    performanceRewardsPunishments: [{
                        required: true,
                        message: '请输入业绩及奖惩情况',
                        trigger: 'blur'
                    }
                    ],
                },
                workExperiences: {
                    companyName: [{
                        required: true,
                        message: '请输入公司名称',
                        trigger: 'blur'
                    }],
                    experienceStartTime: [{
                        required: true,
                        message: '请输入在职开始时间',
                        trigger: 'blur'
                    }],
                    experienceEndTime: [{
                        required: true,
                        message: '请输入在职结束时间',
                        trigger: 'blur'
                    }],
                    positionName: [{
                        required: true,
                        message: '请输入担任职位',
                        trigger: 'blur'
                    }],
                    departmentName: [{
                        required: true,
                        message: '请输入所在部门',
                        trigger: 'blur'
                    }],
                    workDescription: [{
                        required: true,
                        message: '请输入工作内容',
                        trigger: 'blur'
                    }],
                },
                educationExperiences: {
                    // 教育
                    schoolName: [{
                        required: true,
                        message: '请输入学校名称',
                        trigger: 'blur'
                    }],
                    experienceStartTime: [{
                        required: true,
                        message: '请输入在职开始时间',
                        trigger: 'blur'
                    }],
                    experienceEndTime: [{
                        required: true,
                        message: '请输入在职结束时间',
                        trigger: 'blur'
                    }],
                    educationLevel: [{
                        required: true,
                        message: '请选择学历',
                        trigger: 'blur'
                    }],
                    xuexinCoding: [{
                        required: true,
                        message: '请输入学信网编码',
                        trigger: 'blur'
                    }],
                    specialFieldName: [{
                        required: true,
                        message: '请输入专业名称',
                        trigger: 'blur'
                    }],
                    positionName: [{ min: 1, max: 50, message: '长度在 1 到 50 个字符', trigger: 'blur' }],
                    specialFieldDescription: [{ min: 1, max: 500, message: '长度在 1 到 500 个字符', trigger: 'blur' }],
                },
                projectExperiences: {
                    // 项目经历
                    projectName: [{
                        required: true,
                        message: '请输入项目名称',
                        trigger: 'blur'
                    }],
                    experienceStartTime: [{
                        required: true,
                        message: '请输入开始时间',
                        trigger: 'blur'
                    }],
                    experienceEndTime: [{
                        required: true,
                        message: '请输入结束时间',
                        trigger: 'blur'
                    }],
                    positionName: [{
                        required: true,
                        message: '请输入担任职位',
                        trigger: 'blur'
                    }],

                    projectDescription: [{
                        required: true,
                        message: '请输入项目描述',
                        trigger: 'blur'
                    }],
                },
                trainingExperiences: {
                    //培训经历
                    experienceName: [{
                        required: true,
                        message: '请输入培训名称',
                        trigger: 'blur'
                    }],
                    experienceStartTime: [{
                        required: true,
                        message: '请输入开始时间',
                        trigger: 'blur'
                    }],
                    experienceEndTime: [{
                        required: true,
                        message: '请输入结束时间',
                        trigger: 'blur'
                    }],
                    experienceDirections: [{
                        required: true,
                        message: '请输入培训方向',
                        trigger: 'blur'
                    }],
                    experienceDescription: [{
                        required: true,
                        message: '请输入培训描述',
                        trigger: 'blur'
                    }],
                },
                skills: {
                    // 专业技能
                    skillName: [{
                        required: true,
                        message: '请输入技能名称',
                        trigger: 'blur'
                    }],
                    masterTime: [{
                        required: true,
                        message: '请输入掌握时间',
                        trigger: 'blur'
                    }],
                    proficiencyLevel: [{
                        required: true,
                        message: '请选择熟练程度',
                        trigger: 'blur'
                    }],
                },
                certificates: {
                    // 资格证书
                    certificateName: [{
                        required: true,
                        message: '请输入证书名称',
                        trigger: 'blur'
                    }],
                    issuanceTime: [{
                        required: true,
                        message: '请输入证书颁发时间',
                        trigger: 'blur'
                    }],
                    issuanceUnit: [{
                        required: true,
                        message: '请输入证书颁发单位',
                        trigger: 'blur'
                    }],
                    certificateDescription: [{
                        required: true,
                        message: '请输入证书描述',
                        trigger: 'blur'
                    }],
                },
                familyMembers: {
                    // 家庭
                    title: [{
                        required: true,
                        message: '请输入称谓',
                        trigger: 'blur'
                    }],
                    fullName: [{
                        required: true,
                        message: '请输入姓名',
                        trigger: 'blur'
                    }],
                },
            },
            ruleForm: {
                personalInformation: {},
                workExperiences: [],
                educationExperiences: [],
                projectExperiences: [],
                certificates: [],
                trainingExperiences: [],
                skills: [],
                familyMembers: []
            },
            currentCell: null,
            editBool: false,// 编辑
            loading: false,//状态
            upLoadImages_e: {//教育经历
                tip: "（最多上传10张，单张图片大小不超过2M，支持jpg、jpeg、png格式）",
                urls: "",
                limit: 10
            },
            upLoadImages: {
                tip: "请上传1寸照，文件大小不超过2M，支持jpg、jpeg、png格式",
                url: "",
            },
            arrivalTimeOption: [],
            lookingForwardNatureWorkOption: [],
            lookingForwardIndustryOption: [],
            lookingForwardSalaryOption: [],
            jobSearchStatusOption: [],
            politicalOutlookOption: [],
            genderOption: [],
            marriageOption: [],
            keyPopulationInformationOption: [],
            sys_yes_noOption: [],
            educationLevelOption: [],
            proficiencyLevelOptions: [],
            fileValue: 0,
        }
    },
    mounted() {
        this.info()
    },
    methods: {
        info() {
            this.arrivalTimeOption = dictSect("arrival_time")
            this.lookingForwardNatureWorkOption = dictSect("position_nature")
            this.lookingForwardIndustryOption = dictSect("company_industry")
            this.lookingForwardSalaryOption = dictSect("salary")
            this.jobSearchStatusOption = dictSect("status_of_job_hunting")
            this.politicalOutlookOption = dictSect("political_outlook")
            this.genderOption = dictSect("sys_user_sex")
            this.marriageOption = dictSect("marriage")
            this.keyPopulationInformationOption = dictSect("key_population_information")
            this.sys_yes_noOption = dictSect("sys_yes_no")
            this.educationLevelOption = dictSect("education")
            this.proficiencyLevelOptions = dictSect("proficiency_level")
            this.getResumeApi()
        },
        dict(value, res) {
            return dictFuns(value, res)
        },
        back() {
            this.$router.push("index2")
        },
        stringFun(res) {
            return res.slice(0, 10)
        },

        uploadImageClicks_(value) {
            console.log("图片携带信息", value);
            this.ruleForm.personalInformation.photo = value.ossId
            this.ruleForm.personalInformation.photoUrl = value.url
        },
        uploadImageClick_es(index) {
            console.log("点击：", index);
            this.fileValue = index
        },

        uploadImageClick_e(value) {
            console.log("多图片教育：", value);
            this.ruleForm.educationExperiences[this.fileValue].ossIds = value.ossIds;
            this.ruleForm.educationExperiences[this.fileValue].files = value.urls
            console.log(this.ruleForm.educationExperiences);
        },
        uploadImageClick_z(value) {
            console.log("多图片资格证书：", value);
            this.ruleForm.certificates[this.fileValue].ossIds = value.ossIds;
            this.ruleForm.certificates[this.fileValue].files = value.urls
            console.log(this.ruleForm.certificates);
        },
        // 给单元格绑定横向和竖向的index，这样就能确定是哪一个单元格
        tableCellClassName({ row, column, rowIndex, columnIndex }) {
            row.index = rowIndex;
            column.index = columnIndex;
        },
        // 获得当前双击的单元格的横竖index，然后拼接成一个唯一字符串用于判断，并赋给currentCell
        // 拼接后类似这样："1,0","1,1",
        dbclick(row, column) {
            this.currentCell = row.index + ',' + column.index;
            // 这里必须要setTimeout，因为在点击的时候，input才刚被v-if显示出来，不然拿不到dom
            setTimeout(() => {
                // 双击后自动获得焦点
                this.$refs[row.index + ',' + column.index].focus();
            })
        },
        // 当input失去焦点的时候，隐藏input
        hideInput() {
            this.currentCell = null;
        },
        asdiseClick(value) {
            console.log(value);
            this.goAnchor(`#vital${value}`)
        },
        //锚点跳转
        goAnchor(selector) {/*参数selector是id选择器（#anchor14）*/
            document.querySelector(selector).scrollIntoView({
                behavior: "smooth"
            });
        },
        edit() {
            this.editBool = true
        },
        editClean() {
            this.editBool = false
            this.getResumeApi()
        },
        submitForm(formName) {
            this.$refs[formName].validate((valid) => {
                if (valid) {
                    console.log(this.ruleForm.educationExperiences);
                    if (this.ruleForm.educationExperiences.length < 3) {
                        this.$message({
                            message: "请填写不小于3段教育经历",
                            type: 'error'
                        });
                        return
                    } else {
                        let obj = {
                            personalInformation: this.ruleForm.personalInformation,
                            workExperiences: this.ruleForm.workExperiences,
                            educationExperiences: this.ruleForm.educationExperiences,
                            projectExperiences: this.ruleForm.projectExperiences,
                            certificates: this.ruleForm.certificates,
                            trainingExperiences: this.ruleForm.trainingExperiences,
                            skills: this.ruleForm.skills,
                            familyMembers: this.ruleForm.familyMembers
                        }
                        // obj.educationExperiences.forEach(element => {
                        //     delete element.upLoadImages_e
                        // })
                        console.log("数据：", obj);
                        this.loading = true
                        editResume(obj).then(res => {
                            this.loading = false
                            this.$message({
                                message: '保存成功',
                                type: 'success'
                            });
                            this.getInfo_()
                        }).catch(res => {
                            this.loading = false
                            this.$message({
                                message: res.msg,
                                type: 'error'
                            });
                        })
                    }

                    // alert('submit!');
                } else {
                    console.log('error submit!!');
                    return false;
                }
            });
        },
        getInfo_() {
            getInfo().then(res => {
                // console.log("个人信息", res);
                sessionStorage.setItem("myInfornation", JSON.stringify(res.data))
            })
        },
        getRules(item, name) {
            if (item.input) {
                return [
                    { required: true, message: '请输入' + name, trigger: 'blur' },
                ]
            } else {
                return [
                    { required: true, message: '请选择' + name, trigger: 'change' }
                ];
            }
        },
        add(value) {
            let obj = {}
            switch (value) {
                case 0://工作经验
                    obj = {
                        companyName: "",
                        workDescription: "",
                        experienceStartTime: "",
                        experienceEndTime: "",
                        positionName: "",
                        departmentName: "",
                        workDescription: ""
                    }
                    this.ruleForm.workExperiences.push(obj)
                    break;
                case 1://教育经历
                    obj = {
                        schoolName: "",
                        educationLevel: "",
                        experienceStartTime: "",
                        experienceEndTime: "",
                        xuexinCoding: "",
                        specialFieldName: "",
                        positionName: "",
                        specialFieldDescription: "",
                        ossIds: "",
                        files: "",
                        upLoadImages_e: {//教育经历
                            tip: "（最多上传10张，单张图片大小不超过2M，支持jpg、jpeg、png格式）",
                            urls: [],
                            limit: 10
                        }
                    }
                    this.ruleForm.educationExperiences.push(obj)
                    break;
                case 2://项目经历
                    obj = {
                        projectName: "",
                        positionName: "",
                        experienceStartTime: "",
                        experienceEndTime: "",
                        projectDescription: "",
                    }
                    this.ruleForm.projectExperiences.push(obj)
                    break;
                case 3://培训经历
                    obj = {
                        experienceName: "",
                        experienceDirections: "",
                        experienceStartTime: "",
                        experienceEndTime: "",
                        experienceDescription: "",
                    }
                    this.ruleForm.trainingExperiences.push(obj)
                    break;
                case 4://专业技能
                    obj = {
                        skillName: "",
                        masterTime: "",
                        proficiencyLevel: "",
                    }
                    this.ruleForm.skills.push(obj)
                    break;
                case 5://资格证书
                    obj = {
                        certificateName: "",
                        issuanceTime: "",
                        issuanceUnit: "",
                        desc: "",
                        upLoadImages_e: {//资格证书
                            tip: "（最多上传10张，单张图片大小不超过2M，支持jpg、jpeg、png格式）",
                            urls: [],
                            limit: 10
                        }
                    }
                    this.ruleForm.certificates.push(obj)
                    break;
                case 6://家庭及社会关系
                    obj = {
                        title: "",
                        fullName: "",
                        brithDay: "",
                        politicalOutlook: "",
                        workUnitAndPosition: "",
                        contactInformation: "",
                    }
                    this.ruleForm.familyMembers.push(obj)
                    break;

                default:
                    break;
            }
        },
        deleteClick(value, item, index) {//删除
            switch (value) {
                case 0://工作经验
                    this.ruleForm.workExperiences.splice(index, 1)
                    break;
                case 1://教育经历
                    this.ruleForm.educationExperiences.splice(index, 1)
                    break;
                case 2://项目经历
                    this.ruleForm.projectExperiences.splice(index, 1)
                    break;
                case 3://培训经历
                    this.ruleForm.trainingExperiences.splice(index, 1)
                    break;
                case 4://专业技能
                    this.ruleForm.skills.splice(index, 1)
                    break;
                case 5://资格证书
                    this.ruleForm.certificates.splice(index, 1)
                    break;
                case 6://家庭及社会关系
                    this.ruleForm.familyMembers.splice(index, 1)
                    break;
                default:
                    break;
            }
        },
        fileClick(value, item, index) {//删除
            switch (value) {
                case 0://工作经验
                    break;
                case 1://教育经历
                    this.fileValue = index
                    break;
                default:
                    break;
            }
        },
        uploadImageClicks_g(value) {//上传简历
            console.log(value);
            this.loadingTitle = value.type
            setTimeout(() => {
                this.loading = value.bool
            }, 500)
            if (value.data) {
                console.log("value.data", value.data);
                this.editBool = true
                // uni.setStorageSync("myResume", value.data)
                this.infos(value.data)
            }
        },
        infos(data) {
            this.ruleForm.personalInformation = data.personalInformation
            this.upLoadImages.url = data.personalInformation.photoUrl || ""
            this.ruleForm.certificates = data.certificates || []
            this.ruleForm.educationExperiences = data.educationExperiences || []
            this.ruleForm.educationExperiences.forEach(element => {
                // console.log("教育附件", element.files);
                let upLoadImages_e = {//教育经历
                    tip: "（最多上传10张，单张图片大小不超过2M，支持jpg、jpeg、png格式）",
                    urls: element.files || [],
                    limit: 10
                }
                element.upLoadImages_e = upLoadImages_e
            })
            this.ruleForm.certificates.forEach(element => {
                // console.log("教育附件", element.files);
                let upLoadImages_e = {//资格证书
                    tip: "（最多上传10张，单张图片大小不超过2M，支持jpg、jpeg、png格式）",
                    urls: element.files || [],
                    limit: 10
                }
                element.upLoadImages_e = upLoadImages_e
            })
            this.ruleForm.familyMembers = data.familyMembers || []
            this.ruleForm.isInvite = data.isInvite || []
            this.ruleForm.projectExperiences = data.projectExperiences || []
            this.ruleForm.skills = data.skills || []
            this.ruleForm.trainingExperiences = data.trainingExperiences || []
        },
        getResumeApi() {
            this.loading = true
            getResume().then(res => {
                console.log("我的简历：", res);
                this.loading = false
                this.infos(res.data)
            })
        },
        down() {
            var userInfoData_ = JSON.parse(sessionStorage.getItem('userInfoData_web'))
            axios({
                url: process.env.BASE_URL + "application/resume/exportResume",
                method: 'get',
                responseType: 'blob', // 这里就是转化为blob文件流，指定响应类型为二进制数据
                headers: {
                    Authorization: `Bearer ${userInfoData_ ? userInfoData_.access_token : ""}`,
                    clientid: userInfoData_ ? userInfoData_.client_id : "1b45e327bb9e739fa094eabd04b1140f",
                    // 'Content-Type': 'application/octet-stream',
                }
            }).then(res => {
                console.log(res);
                const fileName = res.headers['content-disposition'].split('=')[1].replace(`"`, "").replace(`"`, "")
                const href = URL.createObjectURL(res.data)
                const link = document.createElement('a')
                link.download = fileName
                link.href = href
                link.click()
                document.body.removeChild(link);
                URL.revokeObjectURL(href); // 释放内存
            })
        }
    },

}



</script>

<style lang="scss" scoped>
.my_grid {
    display: grid;
    grid-template-columns: repeat(2, 45%);
    position: relative;

    .el-input {
        width: 348px;

        .el-input__inner {
            width: 100%;
        }
    }

    .my_grid_delete {
        position: absolute;
        top: 0px;
        right: 0px;
        width: 88px;
        height: 30px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

.index2_content {
    position: relative;

}

.xuanfu {
    // width: 100%;
    // position: fixed;
    // top: 88px;
}


.gray {
    color: #898989;
}

.my_main_from {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    // align-items: center;


    .el-form-item {
        .el-form--label-top {
            padding: 0;

        }

        .el-form-item__label {
            padding: 0;
        }

        .el-form-item__label {
            font-size: 14px;

        }
    }



}

.my_main_from_pic_p {
    width: 280px;
    margin-left: 20px;
    color: #898989;
    line-height: 20px;
}

.my_main {
    padding: 26px;
    background: #FFFFFF;
    border-radius: 0px 0px 0px 0px;
    opacity: 1;
    border: 1px solid #CACFD6;

    .my_main_title {
        color: #3D3D3D;
        position: relative;
        margin-bottom: 23px;
        display: flex;
        align-items: flex-end;
        position: relative;

        &::after {
            top: 5px;
            left: -26px;
            position: absolute;
            content: "";
            width: 4px;
            height: 16px;
            background: #2F6CBC;
            border-radius: 0px 2px 2px 0px;
            opacity: 1;
        }

        span {
            margin-left: 20px;
            color: #898989;
        }

        .el-button {
            float: right;
            width: 88px;
            height: 30px;
            // background: #2F6CBC;
            border-radius: 8px 8px 8px 8px;
            opacity: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-left: 16px;
        }
    }
}

.indexNav_content {
    height: 70px;
    background: #FFFFFF;
    border-radius: 0px 0px 0px 0px;
    opacity: 1;
    border: 1px solid #CACFD6;

    img {
        width: 24px;
        height: 24px;
        margin: 0px 23px;
    }

}
</style>